<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    //数组的长度可变 比如arr[3]=40，不会报空指针异常，会直接加长数组
    let arr=[10,20,30]
    //遍历数组
    for (let i=0;i<arr.length;i++){
        document.write(arr[i]+"<br>")
    }
</script>
</html>